import request from '@/config/axios'

export interface SyncDataLogVO {
  id: number
  syncType: string
  syncStatus: number
  syncTime: Date
  businessType: string
  operateType: string
  requestData: string
  responseData: string
}

// 查询同步数据日志列表
export const getSyncDataLogPage = async (params) => {
  return await request.get({ url: `/system/sync-data-log/page`, params })
}

// 查询同步数据日志详情
export const getSyncDataLog = async (id: number) => {
  return await request.get({ url: `/system/sync-data-log/get?id=` + id })
}

// 新增同步数据日志
export const createSyncDataLog = async (data: SyncDataLogVO) => {
  return await request.post({ url: `/system/sync-data-log/create`, data })
}

// 修改同步数据日志
export const updateSyncDataLog = async (data: SyncDataLogVO) => {
  return await request.put({ url: `/system/sync-data-log/update`, data })
}

// 删除同步数据日志
export const deleteSyncDataLog = async (id: number) => {
  return await request.delete({ url: `/system/sync-data-log/delete?id=` + id })
}

// 导出同步数据日志 Excel
export const exportSyncDataLog = async (params) => {
  return await request.download({ url: `/system/sync-data-log/export-excel`, params })
}
